package besta.moon.engine.store;

import java.sql.*;

import besta.moon.MoonConnection;
import besta.moon.sql.datatype.MutableNumeric;
import besta.moon.MoonException;
import besta.moon.MoonCode;
import besta.moon.engine.Moon;

public class MoonNoCurrentRow extends Moon {

    private SQLException noCurrentRow() {
        return MoonException.create(MoonCode.ROW_NOCURRENT);
    }

    @Override
    public boolean isNull(int offset) throws SQLException {
        throw noCurrentRow();
    }

    @Override
    public boolean getBoolean(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public byte[] getBytes(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public double getDouble(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public float getFloat(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public int getInt(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public long getLong(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public long getMoney(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public MutableNumeric getNumeric(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public Object getObject(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public String getString(int offset, int dataType) throws Exception {
        throw noCurrentRow();
    }

    @Override
    public void scanObjectOffsets(int[] offsets, int[] dataTypes) {

    }

    @Override
    public int getUsedSize() {
        return 0;
    }

    @Override
    public long getNextPagePos() {
        return -1;
    }

    @Override
    public void deleteRow(MoonConnection con) throws SQLException {
        throw noCurrentRow();
    }

}
